package edu.scau.DAO_mode.util;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

import org.nutz.dao.Dao;
import org.nutz.dao.impl.NutDao;
import org.nutz.dao.impl.SimpleDataSource;

public class DatabaseConnection {
	private Dao dao=null;
	public DatabaseConnection() throws Exception
	{
		  SimpleDataSource ds = new SimpleDataSource();
	      ds.setJdbcUrl("jdbc:oracle:thin:127.0.0.1:1521:orac");
	      ds.setUsername("system");
	      ds.setPassword("xg123");
	      dao = new NutDao(ds);
	}
	public Dao getDao() throws Exception{
		return dao;
	}
	/**
	public void close() throws Exception{
		if (dao!=null) dao.c
	}
	 */
}
